Skip to content

problem_report: avoid double .txt file extension#590

Open
bdrung wants to merge 2 commits intocanonical:mainfrom
bdrung:fix-double-extension
Open

problem_report: avoid double .txt file extension#590
bdrung wants to merge 2 commits intocanonical:mainfrom
bdrung:fix-double-extension

Conversation

@bdrung
Copy link
Copy Markdown
Member

@bdrung bdrung commented Apr 22, 2026

Some bug reports like bug #2147517 have an attachment with double file extension: CurrentDmesg.txt.txt

Do not add .txt in case the key name already contains the file extension.

This PR is stacked on top of #576

Bug: https://launchpad.net/bugs/2149892

@bdrung bdrung force-pushed the fix-double-extension branch from eb5e305 to d63084b Compare April 22, 2026 10:05
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.52%. Comparing base (19cf32f) to head (05d7d77).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #590   +/-   ##
=======================================
  Coverage   84.51%   84.52%           
=======================================
  Files         104      104           
  Lines       20988    20991    +3     
  Branches     3218     3218           
=======================================
+ Hits        17739    17742    +3     
- Misses       2808     2809    +1     
+ Partials      441      440    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bdrung bdrung force-pushed the fix-double-extension branch from d63084b to ba1b5d4 Compare April 24, 2026 14:02
bdrung added 2 commits April 24, 2026 17:17
Refactor `problem_report.py` by introducing the helper function
`_create_text_attachment` in preparation for following commits.

Bug: https://launchpad.net/bugs/2149892
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Some bug reports like bug #2147517 have an attachment with double file
extension: `CurrentDmesg.txt.txt`

Do not add `.txt` in case the key name already contains the file
extension.

Bug: https://launchpad.net/bugs/2149892
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
@bdrung bdrung force-pushed the fix-double-extension branch from ba1b5d4 to 05d7d77 Compare April 24, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant